package demo12;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class test11 {
    public static void main(String[] args) {
        //写（cpu向硬盘来输出数据）
        try(OutputStream outputStream = new FileOutputStream("d:/mma.txt",true)) {
               String msg = "你好java";
               byte[] b = msg.getBytes();
               outputStream.write(b);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
